package svc

import (
	"guar/api/internal/config"
	"guar/guarrpc/guarrpcclient"

	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config  config.Config
	GuarRpc guarrpcclient.Guarrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		GuarRpc: guarrpcclient.NewGuarrpc(zrpc.MustNewClient(c.GuarRpc)),
	}
}
